Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
This pull request is currently a draft. Reviews will not take place until the PR is marked as ready for review. |
b09d2c8 to
4267118
Compare
Signed-off-by: James Dumay <james@generalinference.xyz>
i386
left a comment
There was a problem hiding this comment.
Reviewed the guard-only delta (ce260b6ac..614c3ebb54 — the two commits after the #2873 carry) at head 614c3ebb54. No blocking findings. Content is approve-worthy once the remaining process gates close: #2873 lands and the branch restacks, the draft flips ready for review, GPU qualification per the checklist, and the owner's manual pass. Verdict recorded as a comment because the PR is a draft and approval is held for the owner.
Verified fail-closed end to end:
- Admission runs on every selected candidate, inside the ordered-target loop in
transport_route_model.rs, before any optional exchange hook, on both ingress paths (buffered_exchangelocal+QUIC,passive_exchangeidle/passive/bootstrap).ResponseSafetyBuffer::wrapinstalls the hold before dispatch; arming after the response has started is refused, so nothing can screen too late. - Request screening: complete effective input (≤64 KiB, provider extra fields kept, media-bearing parts rejected), duplicate JSON keys at any depth → 503 before screening a parse view that differs from the forwarded bytes. Explicit Block → 403; missing/not-ready guards, protocol/model/policy-status mismatch, 120 s guard timeout, oversized guard output, malformed verdicts (model/policy_revision binding, bounded
reason_codecharset) → 503. The prompt is marked private before any guard call, so admission failures never persist it; raw captures clear while armed. - Response screening: quarantine capped at 16 MiB, released only on an exact content-length match or connection-delimited with successful shutdown; chunked/incomplete/redirect responses → 503 (chunked-SSE upstream covered by tests). Structured image output, mixed error/output frames, conflicting envelopes, HTML media, non-canonical data URIs, animations, alpha transparency and MIME/header mismatches all fail closed; decode runs on a 2-permit blocking pool with 2 s/30 s timeouts; every verified image is screened against every planned guard; denial responses are static — no content echo.
- Guards: pinned sha256 + byte-count verification of weights and projector at load; exact-shape policy parsing where truncation, unknown labels and non-Stop finishes yield Unavailable — never Allow; readiness self-tests; the guard child process loads its own verified native runtime.
The residual limits (honest-node mitigation, no attestation, GPU placement verified operationally, classifier error rates) are accurately disclosed in the description.
Image-generation routes now require local child-safety guards. Requesters screen effective input text before sending it, providers screen both input text and generated images, and clients can opt into independently checking received images.
Depends on #2873. This draft includes the generic multimodal work from #2873 until that PR lands and the branch is restacked. It is updated to Mesh main after the Skippy cutover in #3193. The guard binaries use Mesh’s pinned standalone Skippy crates. Guard-only comparison.
Architecture
get-imagesscreen_received_images = trueget-imagesserve-imagesThe host requires the corresponding local guard capabilities. The supplied plugins use private embedded Skippy inference, pinned model/projector hashes, fixed policy/templates, actual readiness self-tests, bounded execution and no disk prompt cache. Strict requesters replace YuFeng with Nemotron; they do not load both. Weights are installed alongside the plugins, not embedded in Mesh. The generation backend remains separate.
Mandatory admission runs before optional exchange hooks on every selected candidate, preserving peer fallback without allowing safety rejection to become optional. Explicit blocks return 403; missing/not-ready guards, errors, timeouts, malformed results and resource-limit failures return 503. Guarded HTTP/SSE responses are held until verification completes; core raw request/response captures are suppressed. Structured-image deltas, mixed error/choices frames, framing ambiguity, duplicate keys and invalid raster payloads fail closed.
Build with
just build-image-guardsand install the separately packaged plugins through the existing archive installer. Setup, GPU configuration, pinned checkpoints and licenses.Protocol and scope
Limits
This is an honest-node mitigation, not remote attestation or guaranteed CSAM detection. Classifiers can produce false positives and false negatives; YuFeng's blocked labels also cover some broader harms. The checks cover effective input text and image artifacts, not assistant output text.
Operators must keep generation backends private and withhold unapproved artifacts from files, public URLs, caches and raw logs. Mesh's quarantine cannot undo upstream backend side effects. GPU placement must be verified operationally; readiness does not guarantee GPU-only execution.
Validation
Post-cutover validation on
614c3ebb5:just test-uipassed lint, typechecking, Vitest (2,026 passed, 3 skipped) and the production build.Original author validation before the cutover
just build metalrebuilt native ABI 0.1.79, the standalone Skippy CLI, production UI and Mesh host; both guard executables and their schema exports were built separately.xtaskRust 1.95 lint debt was also observed on the earlier base.just ci-validateinvocation passed, including its automation, integration, legacy, crate-roster, release, console-output and publish-chain consistency checks.publish-crateshere is the read-only consistency command, not artifact publication.The preceding GPU demo used local Metal YuFeng and remote CUDA Nemotron over a private two-node mesh, with seven classifier controls passing and a generated image reaching the console after screening. That evidence used native ABI 0.1.78. Current main requires 0.1.79: its Metal bundle has been rebuilt, but the safety-model deployment must be qualified again on the final build before marking ready. No CPU safety-model inference is used for this preparation.
Keep draft until #2873 lands, this branch is restacked, required hosted checks pass, and final GPU deployment qualification completes.